/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
	AppRegistry,
	StyleSheet,
	Text,
	View,
	Image,
	ScrollView,
	TouchableOpacity,
	Dimensions,
	NativeModules,
	PixelRatio,
	Modal,
	AsyncStorage,
	Platform,
	BackHandler,
	DeviceEventEmitter,
	NetInfo,
	PermissionsAndroid,
	TouchableHighlight,
	Alert
} from 'react-native';

import {ImageCache} from "react-native-img-cache";
import Common from '../../component/common';
import ScreenUtils from '../../component/ScreenUtils';
import Login from './login';
import Recharge from '../specialColumn/recharge';
import Subscription from './subscription';
import Collection from './collection';
import About from './about';
import Feedback from './feedback';
import TipModal from './part/tipModal';
import Toast from 'react-native-root-toast';
import AppStorage from '../../component/appstorage';
const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? 20*2 : 25*2;
const os = Platform.OS;
const MyImagePicker = NativeModules.ImageCropPicker

export default class index extends Component {
	constructor(props) {
		super(props);
		this.state = {
			modalVisible: false,
			status: "loading",
			StatusText: "",
			openLoginOut: false,
			login: false,
			user: {},
			mynetInfo: false,
			versionStatus:false,
			version:"",
			checkDevice: '',
			openPersonAvatarImage:false
		};
	}
	componentWillMount() {
		Common.checkDevice((checkDevice) => {
	      this.setState({checkDevice});
	    });
		if(loginInfo){
			this.setState({login: true, user: loginInfo});
		}else{
			this.setState({login: false, user: {}});
		}
		//判断是否有网

		NetInfo.isConnected.fetch().done(
			(isConnected) => {
				this.setState({
					mynetInfo: isConnected
				})
				//this._update()
			}
		);
		// 监测网络情况
		NetInfo.isConnected.addEventListener(
			'connectionChange',
			this._handleConnectionInfoChange.bind(this)
		);
		if(Platform.OS === 'android') {
			BackHandler.addEventListener('hardwareBackPress', () => Common.onBack(this));
		}
	}
	componentDidMount() {
		
		this.subscription = DeviceEventEmitter.addListener('saveUserInfo', (data) => {
			this.setState({
				user: data,
				login: true,
			})
		});
		

		/*this.fetchData(this.state.user.userToken);*/
	}

	componentWillUnmount() {
		this.timer && clearTimeout(this.timer);
		this.timer2 && clearTimeout(this.timer2);
		this.cleartimer && clearTimeout(this.cleartimer);
		this.subscription.remove();
		NetInfo.isConnected.removeEventListener(
			'connectionChange',
			this._handleConnectionInfoChange.bind(this)
		);
		if(Platform.OS === 'android') {
			BackHandler.removeEventListener('hardwareBackPress', () => Common.onBack(this));
		}
	}

	_handleConnectionInfoChange(isConnected) {
		
		this.setState({
			mynetInfo: isConnected
		})
	}
	
	/*
	 * versionStatus：当前的版本和服务器版本是否一致，是否需要更新    （bool）
	 * version: 当前的版本（String）
	 * */
					
	/*_update() {
		if(this.state.mynetInfo) {
			
			NativeModules.JsAndroid.jsVersion(
				(msg) => {

				},
				(versionStatus, version) => {
					this.setState({
						versionStatus:versionStatus,
						version:version,
					})
					
				}
			);
		} else {
			Toast.show("当前没有网络", {
				duration: 1000,
				position: Toast.positions.CENTER,
				shadow: true,
				animation: true,
				hideOnPress: true,
				delay: 0
			})
		}
	}*/
	
	// _updateVersion (){
	// 	this.setState({
	// 		modalVisible: true,
	// 		status: "loading",
	// 		StatusText: "检查版本更新中",
	// 	});
	// 	if(!this.state.versionStatus) {
	// 		this.timer = setTimeout(
	// 			() => {
	// 				this.setState({ status: "success", StatusText: "当前已是最新版本" });
	// 				this.cleartimer = setTimeout(
	// 					() => {
	// 						this.setState({
	// 							modalVisible: false,
	// 							status: "loading",
	// 							StatusText: "",
	// 						})
	// 					},
	// 					1500
	// 				)
	// 			},
	// 			1500
	// 		)
	// 	} else {
	// 		this.timer = setTimeout(
	// 			() => {
	// 				this.setState({ status: "new", StatusText: "检测到新版本(" + this.state.version + ")" });
	// 			},
	// 			2000
	// 		)
	// 	}	
		
	// }

	_clear() {
		this.setState({
			modalVisible: true,
			status: "loading",
			StatusText: "清除缓存中",
		});
		ImageCache.get().clear();
		NativeModules.JsAndroid.jsClearCache(
			(msg) => {
				console.log("msg:" + msg);
				this.cleartimer = setTimeout(
					() => {
						this.setState({
							modalVisible: false,
							status: "loading",
							StatusText: "",
						})
					},
					1000
				)
			},
			(x, y, ) => {
				this.timer2 = setTimeout(
					() => {
						this.setState({ status: "success", StatusText: "已清除" + y });
						this.cleartimer = setTimeout(
							() => {
								this.setState({
									modalVisible: false,
									status: "loading",
									StatusText: "",
								})
							},
							1000
						)
					},
					1000
				)
			}
		);
		//NativeModules.JsAndroid.jsOpenSettingsClearCacheActivity();
	}
	handleOpenCamera() {
		let that = this;
		MyImagePicker.openCamera({
			width: 137,
			height: 137,
			cropping: true,
			cropperCircleOverlay: true,
			compressImageQuality: 1,
		}).then(image => {
			if(image.size < 2 * 1024 * 1024) {
				that.fetchImage(image.path);
			} else {
				Alert.alert(
					'提示',
					'图片过大，请重新选择一张', [
						{ text: '确认' },
					], { cancelable: true }
				)
			}
		});
	}
	async openByCamera() {
		this.setState({ openPersonAvatarImage: false ,openLoginOut:false})
		if(Platform.OS === 'android') {
			const granted2 = await PermissionsAndroid.check('android.permission.CAMERA');
			let result = await PermissionsAndroid.check("android.permission.WRITE_EXTERNAL_STORAGE");
			if(result){
				if(granted2) {
					this.handleOpenCamera()
				} else {
					//this.requestCameraPermission();
					Common.userTip("请到权限管理中打开相机权限");
				}
			}else{
				// Toast.show("请到设置->应用->权限中打开SD卡读写权限", {
			 //     duration: Toast.durations.LONG,
			 //     position: Toast.positions.CENTER,
			 //     shadow: true,
			 //     animation: true,
			 //     hideOnPress: true,
			 //     delay: 0
			 //    })
				Common.userTip("请到权限管理中打开SD卡读写权限")
			}

		} else {
			this.handleOpenCamera()
		}
	}

	openByMyPicker() {
		this.setState({ openPersonAvatarImage: false ,openLoginOut:false})
		let that = this;
		MyImagePicker.openPicker({
			width: 137,
			height: 137,
			compressImageMaxHeight: 137,
			compressImageMaxWidth: 137,
			compressImageQuality: 1,
			cropperCircleOverlay: true,
			cropping: true,
			mediaType: "photo",
		}).then(image => {
			if(image.size < 2 * 1024 * 1024) {
				that.fetchImage(image.path);
			} else {
				alert("图片过大，请重新选择一张")
			}
		});
	}
	async openByPicker() {
	    this.setState({ openPersonAvatarImage: false ,openLoginOut:false})
	    if(Platform.OS === 'android'){
	  	   let result = await PermissionsAndroid.check("android.permission.WRITE_EXTERNAL_STORAGE");
		   if(result){
		    this.openByMyPicker();
		   }else{
		   //  Toast.show("请到设置->应用->权限中打开SD卡读写权限", {
		   //   duration: Toast.durations.LONG,
		   //   position: Toast.positions.CENTER,
		   //   shadow: true,
		   //   animation: true,
		   //   hideOnPress: true,
		   //   delay: 0
		   //  })
				Common.userTip("请到权限管理中打开SD卡读写权限")
		   }
		   
		}else{
		   this.openByMyPicker();
		}
	 }
	fetchImage(avatarContent) {
		let formData = new FormData();
		formData.append("userToken", this.state.user.userToken);
		let file = { "uri": avatarContent, "type": "multipart/form-data", name: "image.png" };
		formData.append("avatarContent", file);
		let _that = this;
		Common.fetchData("POST", "/userCenter/changeAvatar", formData, (responseData) => {
			Toast.show("上传头像成功", {
				duration: Toast.durations.LONG,
				position: Toast.positions.CENTER,
				shadow: true,
				animation: true,
				hideOnPress: true,
				delay: 0
			});
			let userData = this.state.user;
			userData.picMinPath = responseData.picMinPath;
			AppStorage._updataLocalData("login", userData);
			AppStorage._loadLocalData("login", function(userData) {
				_that.setState({
					user: userData,
				})
				/*alert("上形成："+JSON.stringify(userData));*/
			})
		}, () => {
			Toast.show("上传头像失败", {
				duration: Toast.durations.LONG,
				position: Toast.positions.CENTER,
				shadow: true,
				animation: true,
				hideOnPress: true,
				delay: 0
			});
		}, () => {
			Toast.show("上传头像失败", {
				duration: Toast.durations.LONG,
				position: Toast.positions.CENTER,
				shadow: true,
				animation: true,
				hideOnPress: true,
				delay: 0
			});
		});
	}
	handleLoginOut() {
		NativeModules.JsAndroid.jsUserExit(
			(msg) => {
				Toast.show("网络异常，请稍后重试", {
					duration: Toast.durations.LONG,
					position: Toast.positions.CENTER,
					shadow: true,
					animation: true,
					hideOnPress: true,
					delay: 0
				});
			},
			(status) => {
				if(status) {
					AppStorage._remove("login");
					this.setState({
						user: {},
						login: false,
						openLoginOut: false,
					});
					DeviceEventEmitter.emit('loginStatus',null);
				} else {
					Toast.show("出错了~~，请稍后重试", {
						duration: Toast.durations.LONG,
						position: Toast.positions.CENTER,
						shadow: true,
						animation: true,
						hideOnPress: true,
						delay: 0
					});
				}
			}
		);
	}
	handleChange(val) {
		this.setState({
			modalVisible: val,
			status: "loading",
			StatusText: "",
		});
	}
	handleForward(component) {
		if(this.state.login) {
			Common.onForward(this, component, "", "")
		} else {
			Toast.show("您还未登录，请先登录", {
				duration: 1000,
				position: Toast.positions.CENTER,
				shadow: true,
				animation: true,
				hideOnPress: true,
				delay: 0
			})
		}
	}
	handleOpenLoginOut() {
		this.setState({
			openLoginOut: true
		})
	}
	hideModal() {
		this.setState({ openPersonAvatarImage: false })
	}
	renderPersonAvatarImage() {
		return(
			<View>
			    <Modal
			        animationType={"fade"}
					transparent={true}
					visible={this.state.openPersonAvatarImage}
					onRequestClose={() => { 
						if (Platform.OS === 'android') { 
							this.setState({openPersonAvatarImage:false})
						}
					}}
			    >
		        <TouchableOpacity style={{flex:1}} activeOpacity={1} onPress = {() => {this.setState({openPersonAvatarImage:false})}}>
			        <View style={styles.modalBackground} onPress = {this.hideModal.bind(this)}>
			          <View style={[styles.modalContent,{height:ScreenUtils.scaleSize(336)}]}>
				          <View style={styles.modalContentWrap}>
				          	<TouchableOpacity style={styles.modalBtn} onPress={this.openByCamera.bind(this)} >
				          		<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>拍照</Text>
				          	</TouchableOpacity>
				            <TouchableOpacity onPress={this.openByPicker.bind(this)} style={[styles.modalBtn,{borderTopWidth:1,borderColor:'#d5d5d5'}]}>
				          		<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>打开相册</Text>
				          	</TouchableOpacity>
				          	<TouchableOpacity style={[styles.modalBtn,{borderTopWidth:1,borderColor:'#d5d5d5'}]} onPress = {() => {this.setState({openPersonAvatarImage:false})}}>
				          		<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>取消</Text>
				          	</TouchableOpacity>
				          </View>
			          </View>
			        </View>
			    </TouchableOpacity>
		    </Modal>
	    </View>
		);
	}
	renderLoginOut() {
		return(
			<View>
		      	<Modal
			        animationType={"fade"}
					transparent={true}
					visible={this.state.openLoginOut}
					onRequestClose={() => { 
						if (Platform.OS === 'android') { 
							this.setState({openLoginOut:false,openPersonAvatarImage:false})
						}
					}}
		        >	
					{
						!this.state.openPersonAvatarImage ?
						<TouchableOpacity style={{flex:1}} activeOpacity={1} onPress = {() => {this.setState({openLoginOut:false})}}>
							<View style={styles.modalBackground}>
							<View style={styles.modalContent}>
								<View style={styles.modalContentWrap}>
									{
										os !== 'ios' ?
										<TouchableOpacity style={styles.modalBtn} onPress = {() => {this.setState({openPersonAvatarImage:true})}}>
											<Text style={{fontSize:ScreenUtils.scaleSize(30),}}>更换头像</Text>
										</TouchableOpacity> : null
									}
									<TouchableOpacity style={[styles.modalBtn,{borderTopWidth:Platform.OS !== 'ios' ? 1 : 0,borderColor:'#d5d5d5'}]} onPress={this.handleLoginOut.bind(this)}>
										<Text style={{color:"#f71314",fontSize:ScreenUtils.scaleSize(30),}}>退出登录</Text>
									</TouchableOpacity>
									{/*<TouchableOpacity style={[styles.modalBtn,{borderTopWidth:1,borderColor:'#d5d5d5'}]} onPress = {() => {this.setState({openLoginOut:false})}}>
										<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>取消</Text>
									</TouchableOpacity>*/}
								</View>
							</View>
							</View>
						</TouchableOpacity> : null
					}
					{
						this.state.openPersonAvatarImage ?
						<TouchableOpacity style={{flex:1}} activeOpacity={1} onPress = {() => {this.setState({openPersonAvatarImage:false})}}>
							<View style={styles.modalBackground} onPress = {this.hideModal.bind(this)}>
							<View style={[styles.modalContent,{height:ScreenUtils.scaleSize(336)}]}>
								<View style={styles.modalContentWrap}>
									<TouchableOpacity style={styles.modalBtn} onPress={this.openByCamera.bind(this)} >
										<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>拍照</Text>
									</TouchableOpacity>
									<TouchableOpacity onPress={this.openByPicker.bind(this)} style={[styles.modalBtn,{borderTopWidth:1,borderColor:'#d5d5d5'}]}>
										<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>打开相册</Text>
									</TouchableOpacity>
									<TouchableOpacity style={[styles.modalBtn,{borderTopWidth:1,borderColor:'#d5d5d5'}]} onPress = {() => {this.setState({openPersonAvatarImage:false,openLoginOut:false})}}>
										<Text style={{color:"#444",fontSize:ScreenUtils.scaleSize(30),}}>取消</Text>
									</TouchableOpacity>
								</View>
							</View>
							</View>
						</TouchableOpacity> : null
					}
		      	</Modal>
		    </View>
		);
	}

	render() {
		let loginStatus = (this.state.login ? this.state.user.userName : "点击登录");
		return(
			<View style ={styles.personContainer}>
		      	
		      	<ScrollView
		      		style={{marginBottom: this.state.checkDevice == 'x'?ScreenUtils.scaleSize(50):0}}
		      		keyboardDismissMode = "on-drag"
					showsVerticalScrollIndicator ={false}
					keyboardShouldPersistTaps="always"
					horizontal = {false}
					ref = {(e) => this.location = e} 
					alwaysBounceVertical = {true}
	                onScrollBeginDrag = {(event)=>{
	                	
	                	this.scrollDistabce = event.nativeEvent.contentOffset.y
	                }}
	                onScrollEndDrag = {(event)=>{
	                	var nowLocation = event.nativeEvent.contentOffset.y;
	                	if(this.scrollDistabce>nowLocation){
		                		this.location.scrollTo({x: 0, y: 0, animated:true});
	                	}
	                	//alert(nowLocation);
	                	
	                }}
		      	>
		      	{this.state.modalVisible ? <TipModal onChange={(val)=> this.handleChange(val)} statusText={this.state.StatusText} status={this.state.status} show={this.state.modalVisible} style={styles.modals}/> : null}
		      	{this.state.checkDevice == "x"?
		      		<View style={{backgroundColor: '#ff4545',height: ScreenUtils.scaleSize(53)}}/>:null
		      	}
		      		{
		      			this.state.user && this.state.login?
				      		(
				      			<TouchableOpacity style={styles.personWrap} activeOpacity ={os=="ios" ? 1 : 0.8}
					      			onPress={() => {
					      					this.setState({openLoginOut:true})
					      			}}
					      		>

						      		<View style={styles.personAvatar}>
						      			<View style={styles.personAvatarImageWrap}>
						      				{
						      					(this.state.user.picMinPath && this.state.user.picMinPath !=="") ? 
						      						(
						      							this.state.mynetInfo ? 
						      							<Image style={styles.personAvatarImage} source={{uri: this.state.user.picMinPath}}/> :
						      							<Image style={styles.personAvatarImage} source = {require('../../images/me/User.png')}/>
						      						)
						      						: <Image style={styles.personAvatarImage} source = {require('../../images/me/User.png')}/>
						      				}
						      			</View>
						      		</View>
						      		<View>
						      			<Text style={styles.userName}>{loginStatus}</Text>
						      		</View>
						    	</TouchableOpacity>
					    	)
			      			:  (<TouchableOpacity 
			      					style={styles.personWrap} 
			      					activeOpacity ={0.8} 
			      					onPress = {() => Common.onForward(this,Login)}
			      				>
						      		<View style={styles.personAvatar}>
						      			<View style={styles.personAvatarImageWrap}>
						      				<Image style={styles.personAvatarImage} source = {require('../../images/me/User.png')}/>
						      			</View>
						      		</View>
						      		<View>
						      			<Text style={styles.userName}>{loginStatus}</Text>
						      		</View>
						    	</TouchableOpacity>)
		      		}
					<View style={styles.dealMargin}>
						<View style={[styles.aboutMe,styles.sperateBorder]}>
							<TouchableHighlight 
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress = {this.handleForward.bind(this,Recharge)}
							>
					  			<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIconOne} source = {require('../../images/me/account.png')}/>
										<Text style={styles.Textcolor}>我的账户</Text>
									</View>
									<View style={styles.seperateRight}></View>
								</View>
							</TouchableHighlight>
							<TouchableHighlight 
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress = {this.handleForward.bind(this,Subscription)}
							>
								<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIconOne} source = {require('../../images/me/flag.png')}/>
										<Text style={styles.Textcolor}>我的订阅</Text>
									</View>
									<View style={styles.seperateRight}></View>
								</View>
							</TouchableHighlight>
							<TouchableHighlight
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress = {this.handleForward.bind(this,Collection)}
							>
								<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIconOne} source = {require('../../images/me/star.png')}/>
										<Text style={styles.Textcolor}>我的收藏</Text>
									</View>
									
								</View>
							</TouchableHighlight>
						</View>
						<View style={styles.aboutMe}>
							<TouchableHighlight
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress = {() => Common.onForward(this,Feedback,Feedback,this.state.user ? this.state.user.userToken : "")}
							>
								<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIcon} source = {require('../../images/me/mail.png')}/>
										<Text style={styles.Textcolor}>意见反馈</Text>
									</View>
									<View style={styles.seperateRight}></View>
								</View>
							</TouchableHighlight>
							{/*
							<TouchableHighlight
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress ={this._updateVersion.bind(this)}
							>
								<View style={styles.aboutMeItem}>
									<Image style={styles.listIcon} source = {require('../../images/me/banbenggengxin.png')}/>
									<View style={styles.newVersionStatus}>
										<Text style={styles.newVersionTip}>版本更新</Text>
										{
											this.state.versionStatus ? 
											<View style={styles.newVersionWrap}><Text style={styles.newVersion}>!</Text></View>
											: null
										}
									</View>
								</View>
							</TouchableHighlight>
							*/
							}
							<TouchableHighlight
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress ={this._clear.bind(this)}
							>
								<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIcon} source = {require('../../images/me/trash.png')}/>
										<Text style={styles.Textcolor}>清除缓存</Text>
									</View>
									<View style={styles.seperateRight}></View>
								</View>
							</TouchableHighlight>
							<TouchableHighlight
								underlayColor="#fafafa" 
								delayPressIn={100}
								style={styles.aboutMeList}
								onPress = {() => Common.onForward(this,About,About)}
							>
								<View style={styles.aboutMeItemWrap}>
									<View style={styles.aboutMeItem}>
										<Image style={styles.listIcon} source = {require('../../images/me/about.png')}/>
										<Text style={styles.Textcolor}>关于我们</Text>
									</View>
									
								</View>
							</TouchableHighlight>
						</View>
						{/*
							this.state.login ? 
							<View style={styles.aboutMe}>
								<TouchableHighlight
									underlayColor="#fafafa" 
									delayPressIn={100}
									style={styles.aboutMeList}
									onPress={this.handleOpenLoginOut.bind(this)}
								>
									<View style={{flex:1,flexDirection:"row",alignItems: "center",}}>
										<Image style={styles.listIcon} source = {require('../../images/me/tuichudenglu.png')}/>
										<Text style={styles.Textcolor}>退出登录</Text>
									</View>
								</TouchableHighlight>
							</View> : null
						*/}
					</View>
			      	 
		      	</ScrollView>
				{this.state.openLoginOut? this.renderLoginOut() :null}
				{/*this.state.openPersonAvatarImage ? this.renderPersonAvatarImage() : null*/}
      	</View>

		);
	}
}

const styles = StyleSheet.create({
	personContainer: {
		flex: 1,
		backgroundColor: "#f6f6f6",
		flexDirection: "row",
	},
	modals: {
		height: Dimensions.get('window').height,
	},
	personWrap: {
		flex: 1,
		height: ScreenUtils.scaleSize(360),
		backgroundColor: "#ff4545",
		justifyContent: 'center',
		alignItems: "center",
		borderBottomWidth: 1,
		borderColor: "#ebebeb",
	},
	personAvatar: {
		width: ScreenUtils.scaleSize(192),
		height: ScreenUtils.scaleSize(140),
		justifyContent: 'center',
		alignItems: "center",
	},
	personAvatarImageWrap: {
		width: ScreenUtils.scaleSize(140),
		height: ScreenUtils.scaleSize(140),
	},
	personAvatarImage: {
		width: ScreenUtils.scaleSize(140),
		height: ScreenUtils.scaleSize(140),
		borderRadius: ScreenUtils.scaleSize(140) / 2,
	},
	userName: {
		marginTop: ScreenUtils.scaleSize(26),
		color: "#fff",
		fontSize: ScreenUtils.scaleSize(30),
	},
	dealMargin:{
		margin: ScreenUtils.scaleSize(10),
		borderRadius:ScreenUtils.scaleSize(10),
		padding:ScreenUtils.scaleSize(10),
		backgroundColor:"#fff",
	},
	sperateBorder:{
		borderBottomWidth:1,
		borderColor:'#e5e5e5'
	},
	aboutMe: {
		display:'flex',
		flexDirection: "row",
		alignItems: "center",
		justifyContent:"center",
	},
	aboutMeItemWrap:{
		display:'flex',
		flexDirection: "row",
		justifyContent:'space-around',
		alignItems:'center',
		
	},
	aboutMeList: {
		height: ScreenUtils.scaleSize(187),
		
		flex:1,
		
		justifyContent:"center",
		
	},
	aboutMeItem:{
		height:ScreenUtils.scaleSize(97),
		flex:1,
		display:"flex",
		flexDirection:"column",
		alignItems: "center",
		justifyContent:'space-around',
		
	},
	seperateRight:{
		width:1,
		height:ScreenUtils.scaleSize(68),
		backgroundColor:"#e5e5e5",
		
	},
	listIconOne:{
		width: ScreenUtils.scaleSize(54),
		height: ScreenUtils.scaleSize(63),
		resizeMode:"contain"
	},
	listIcon: {
		width: ScreenUtils.scaleSize(54),
		height: ScreenUtils.scaleSize(48),
		resizeMode:"contain"
	},
	newVersionTip: {
		color: "#000",
		fontSize: ScreenUtils.scaleSize(28),
	},
	newVersionStatus:{
		flexDirection:"row"
	},
	newVersionWrap:{
		width:ScreenUtils.scaleSize(28),
		height:ScreenUtils.scaleSize(28),
		marginLeft:5,
		borderRadius:ScreenUtils.scaleSize(28)/2,
		overflow:"hidden"
	},
	newVersion:{
		color:"#fff",
		textAlign:"center",
		backgroundColor:"#ff4545"
	},
	Textcolor: {
		color: "#000",
		fontSize: ScreenUtils.scaleSize(22),
	},
	modalBackground: {
		backgroundColor: 'rgba(0, 0, 0, 0.5)',
		flex: 1,
		flexDirection: "row",
		alignItems: "flex-end",
	},
	modalContent: {
		flex: 1,
		margin:ScreenUtils.scaleSize(10),
		height: os !== 'ios' ? ScreenUtils.scaleSize(224) : ScreenUtils.scaleSize(224)/2,
		borderRadius:5,
		backgroundColor: "#fff",
		flexDirection: "column",
	},
	modalContentWrap: {
		flex: 1,
		flexDirection: "column",
		justifyContent: "center",
		alignItems: "center",
	},
	modalBtn: {
		flex: 1,
		width: Dimensions.get('window').width,
		justifyContent: "center",
		alignItems: "center",
	}
});